//
//  YPMineModel.m
//  project
//
//  Created by 姚敦鹏 on 2018/10/25.
//  Copyright © 2018 rocHome. All rights reserved.
//

#import "YPMineModel.h"

@implementation YPMineModel

+(instancetype)modelWithTitle:(NSString *)title iconName:(NSString *)iconName {
    
    return [[self alloc] initWithTitle:title iconName:iconName];
}

-(instancetype)initWithTitle:(NSString *)title iconName:(NSString *)iconName {
    
    if (self = [super init]) {
        _title    = title;
        _iconName = iconName;
    }
    return self;
}

@end


@implementation YPMineSectionModel

+(instancetype)modelWithTitle:(NSString *)title
                 withContents:(NSArray *)contents
                     withOpen:(BOOL)open
{
    return [[self alloc] initWithTitle:title withContents:contents withOpen:open];
}

-(instancetype)initWithTitle:(NSString *)title
                 withContents:(NSArray *)contents
                     withOpen:(BOOL)open
{
    if (self = [super init]) {
        
        _title    = title;
        _contents = [YPMineModel mj_objectArrayWithKeyValuesArray:contents];
        _open     = open;
    }
    return self;
}

@end
